﻿@model IEnumerable<MoviesRoom.Models.Ticket>

@{
    ViewBag.Title = "My tickets";
}



@if (Model.Count() == 0)
{
    <h2>You have not purchased any tickets.</h2>
}
else
{
    <h2>@ViewBag.Title</h2>
    <div class="ticket">
        @foreach (var ticket in Model)
        {
                    <div class="well-small">
                        Film: <strong>@(ticket.Film.Title)</strong>
                        Date: <strong>@(ticket.DateOfPurchase.ToString("dd-MMM-yyyy"))</strong>
                        Price: <strong>@(ticket.Price)</strong>
                        Code: <strong>@(ticket.ReferenceCode)</strong>
                    </div>
                    <hr />
        }
    </div>
}
